import Vue from 'vue'
import Router from 'vue-router'




import login from '@/pages/login/login.vue'
import resetPassword from '@/pages/resetPassword/resetPassword.vue'
import fillInfo from '@/pages/fillInfo/fillInfo.vue'
import index from '@/pages/index/index.vue'
import account from '@/my/account/account.vue'
import store from '@/my/store/store.vue'
import code from '@/my/code/code.vue'
import call from '@/my/call/call.vue'
import withDraw from '@/my/withDraw/withDraw.vue'
import gift from '@/my/gift/gift.vue'
import lastData from '@/my/lastData/lastData.vue'
import tempGoods from '@/my/tempGoods/tempGoods.vue'
import cloneStore from '@/my/cloneStore/cloneStore.vue'
import team from "@/my/team/team.vue"
import storeMana from "@/my/storeMana/storeMana.vue"
import storeChangePay from "@/my/storeChangePay/storeChangePay.vue"
import bnsRank from "@/my/bnsRank/bnsRank.vue"
import goodsMana from "@/my/storeMana/subpages/goodsMana/goodsMana.vue"
import typeMana from "@/my/storeMana/subpages/typeMana/typeMana.vue"
import specMana from "@/my/storeMana/subpages/specMana/specMana.vue"
import orderMana from "@/my/storeMana/subpages/orderMana/orderMana.vue"






Vue.use(Router)

export default new Router({
    routes: [
        {
            //重定向
            path: '*',
            redirect: '/login'
        },
        {
            path: '/login',
            name: 'login',
            component: login
        },
        {
            path: '/fillInfo',
            name: 'fillInfo',
            component: fillInfo
        },
        {
            path: '/resetPassword',
            name: 'resetPassword',
            component: resetPassword
        },
         {
            path: '/index',
            name: 'index',
            component: index,
            redirect: '/store',
            children:[
                {
                    path: '/account',
                    name: 'account',
                    component: account
                },
                {
                    path: '/store',
                    name: 'store',
                    component: store
                },
                {
                    path: '/code',
                    name: 'code',
                    component: code
                },
                {
                    path: '/call',
                    name: 'call',
                    component: call
                },
                {
                    path: '/withDraw',
                    name: 'withDraw',
                    component: withDraw
                },
                {
                    path: '/gift',
                    name: 'gift',
                    component: gift
                },
                {
                    path: '/lastData',
                    name: 'lastData',
                    component: lastData
                },
                {
                    path: '/tempGoods',
                    name: 'tempGoods',
                    component: tempGoods
                },
                {
                    path: '/clone',
                    name: 'clone',
                    component: cloneStore
                },
                {
                    path: '/team',
                    name: 'team',
                    component: team
                },
                {
                    path: '/storeChangePay',
                    name: 'storeChangePay',
                    component: storeChangePay
                },
                {
                    path: '/bnsRank',
                    name: 'bnsRank',
                    component: bnsRank
                }
            ]
        },
        {
            path: '/storeMana',
            name: 'storeMana',
            component: storeMana,
            redirect: '/storeMana/goodsMana',
            children:[
                {
                    path: '/storeMana/goodsMana',
                    name: 'goodsMana',
                    component: goodsMana
                },{
                    path: '/storeMana/typeMana',
                    name: 'typeMana',
                    component: typeMana
                },
                {
                    path: '/storeMana/specMana',
                    name: 'specMana',
                    component: specMana
                },
                {
                    path: '/storeMana/orderMana',
                    name: 'orderMana',
                    component: orderMana
                },
            ]
        }
    ]
})